﻿#include "mainwindow.h"
#include <QApplication>
#include <QImage>
#include "View/LoginDialog.h"
#include "Sqlite/DeviceDBManager.h"
int main(int argc, char *argv[])
{
    if(QT_VERSION>=QT_VERSION_CHECK(5,6,0))
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QApplication a(argc, argv);

    qRegisterMetaType<InOutCabCommand_Board>("InOutCabCommand_Board");
    qRegisterMetaType<InOutCabCommand_Server>("InOutCabCommand_Server");
    qRegisterMetaType<QRLocateCommand>("QRLocateCommand");
    qRegisterMetaType<QList<QVariantList>>("QList<QVariantList>");
    qRegisterMetaType<QList<PortGoodsIndicator>>("QList<PortGoodsIndicator>");
    qRegisterMetaType<QList<InOutCabCommand_Server>>("QList<InOutCabCommand_Server>");
    qRegisterMetaType<DevArvStatisticsModel>("DevArvStatisticsModel");
    qRegisterMetaType<PagedResultDto<DevArvData>>("PagedResultDto<DevArvData>");
    qRegisterMetaType<QList<SearchCmdModel>>("QList<SearchCmdModel>");
    qRegisterMetaType<QImage>("QImage");
    qRegisterMetaType<QVector<PortGoodsIndicator>>("QVector<PortGoodsIndicator>");
    qRegisterMetaType<QVector<bool>>("QVector<bool>");

//    LoginDialog sa;
//    int ret = sa.exec();
//    if(ret != QDialog::Accepted) return 0;
    MainWindow w;
    w.show();
    return a.exec();
}

